package com.zxw.克隆;

/**
 * @projectName: util-cloud
 * @package: com.zxw.test
 * @className: Test
 * @author: zhangxuewei
 * @description: TODO
 * @date: 2024/3/11 10:12
 * @version: 1.0
 */
public class Test {

    public static void main(String[] args) {
        Clo cc = new Clo();
        cc.setName("zxw");
        cc.setValue("clone");
        try {
            Clo c4 = (Clo) cc.clone();
            System.out.println(c4 == cc);
            System.out.println(c4.getName());
            c4.setName("zjl");
            System.out.println(c4.getName());
            System.out.println(cc.getName());
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
    }
}
